﻿@model IEnumerable<KhuyenMaiVang.DAL.AddressVouCher>
@using KhuyenMaiVang.DAL
@{
    Voucher vouch = ViewBag.voucher;
    ViewBag.Title = "Thêm địa chỉ " + vouch.Title;
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}

@section heading{Danh sách địa chỉ voucher @vouch.Title}

<h4>@vouch.Business.User.DisplayName</h4>
<p>
    @Html.ActionLink("Thêm địa chỉ", "AddAddress", new { id=vouch.ID})
</p>
<table>
    <thead>
    <tr>
        <th>
            Địa chỉ
        </th>
        <th>
            Latitude
        </th>
        <th>
            Longitude
        </th>
        <th>
            Doanh nghiệp
        </th>
        <th></th>
    </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Address.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address.Latitude)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address.Longitude)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Address.Business.MangerName)
        </td>
        <td>
            @Html.ImageLink("DeleteAddress", Url.Content("~/Content/areas/admin/resources/images/icons/cross.png"), "Xóa", new{id=item.ID})
        </td>
    </tr>
}
</tbody>
</table>
